<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 

<h:head>
	<title>Prosperous</title>
	<link rel="stylesheet" href="../../../../resources/styles/layout.css" type="text/css"/>
								
</h:head>

<h:body>
	<h:form id="form1">
	<div class="wrapper row1">
	  <header id="header" class="clear">
	    <hgroup>
	      <h1><a href="index.html">Cardápio Mobile</a></h1>
	      <h2>Seu cardápio para o mundo todo </h2>
	    </hgroup>
			<fieldset class="fl_right">
		    	<p:panel style="width:300px;height:50px;right:200px;top:60px;background:#696969;border:1px solid black">  
			    	<h:outputLabel style="font-weight:bold;color:#FFFFE0;" value="Usuário:"/>
					<h:outputLabel style="font-weight:bold;color:#FFA500;" value="#{loginMB.getSessao('NomeUsuario')}"/>  
					<fieldset>		
						<h:outputLabel value="Acesso: " style="font-weight:bold;color:#FFFFE0;"/>  
						<h:outputText id="restaurante" style="font-weight:bold;color:#FFA500;" value="#{loginMB.getSessao('NomeFantasia')}"/>
					</fieldset>  
				</p:panel> 
			</fieldset>
			<fieldset>
			<p></p>
			</fieldset>
			
	    <nav class="clear">
	      <ul>

	        <li class="active"><a href="#">Minha Conta</a>
	          <ul>
	            <li><a href="portalCardapioMundo.jsf">Portal Home</a></li>
	            <li><a href="../user/meusDados.jsf">Meus Dados</a></li>
	            <li><a href="portalCardapioMundo.jsf?changeAccess=EEN013550">Trocar Acesso</a></li>
	            <li onclick="PF(dlgSair).show()"><a href="#">Sair</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Acesso</a>
	          <ul>
	            <li><a href="../admin/cadUsuario.jsf">Novo Usuário</a></li>
	            <li><a href="../user/consUsuario.jsf">Consulta Usuários</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>
	        
	        <li><a href="#">Restaurante</a>
	          <ul>
	            <li><a href="../admin/cadRestauranteFilial.jsf?operation=ADDFILIAL">Nova Filial</a></li>
	            <li><a href="../user/consRestaurante.jsf?operation=ALTRESTAURANTE">Consulta Restaurante</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Cardápio</a>
	          <ul>
	            <li><a href="../../user/cardapio/opcaoCardapios.jsf">Novo Cardápio</a></li>
	            <li><a href="#">Cardápios</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Business Intelligence</a>
	          <ul>
	            <li><a href="#">Avaliações Cardápio</a></li>
	            <li><a href="#">Avaliações Atendimento</a></li>
	            <li><a href="#">Avaliações Infraestrutura</a></li>
	            <li><a href="#">Avaliação Geral</a></li>
	            <li><a href="#"></a></li>
	          </ul>
	        </li>

	        <li><a href="#">Pagamento</a>
	          <ul>
	            <li><a href="#">Meus Pagamentos</a></li>
	          </ul>
	        </li>

	        <li><a href="#">Plano</a>
	          <ul>
	            <li><a href="#">Meu Plano</a></li>
	            <li><a href="#">Renovação</a></li>
	            <li><a href="#">Novos Planos</a></li>
	          </ul>
	        </li>
	        
	      </ul>
	    </nav>
	  </header>
	</div>
	
	<p:dialog id="dialogSair" header="Opção Logout" modal="true" height="85" width="510" widgetVar="dlgSair" resizable="false" 
	showEffect="fade" hideEffect="fade">  
		<h:panelGrid columns="2" cellpadding="5">  
			<h:outputLabel for="username" value="Deseja desconectar do portal Cardápio Mobile ?" style="font-size:15px"/>
		</h:panelGrid>
				          
		<f:facet name="footer">  
			<p class="fl_left">
			<p:commandButton id="cancelarButton" value="Cancelar" height="50" width="50" onclick="PF(dlgSair).hide();"/>
			</p>
			<p class="fl_right">
				<p:commandButton id="sairButton" value="Sair" height="50" width="50" actionListener="#{acessoMB.logout}"/>
			</p>  
		</f:facet>  
    </p:dialog>
	
	</h:form>
	
	
	    <!-- ########################################################################################## -->
	<h:form id="form2">
	<div class="wrapper row2">
	    <div id="container" class="clear"> 
	    	<div id="homepage">
  				<p:messages id="mensagem" for="mensagem" showDetail="true" autoUpdate="true"/>
  				
  				
  				<!-- ############################ DIALOG ::  MENSAGEM  DECISÃO ########################### -->

	    		      <p:dialog id="dialogMsgDecisao" header="Confirmação" modal="true" height="100" width="390" widgetVar="dlgMsgDecisao" resizable="false" showEffect="fade" hideEffect="fade">  
					<h:outputLabel value="#{msgs.msgAlteraCardapio}" style="font-size:15px"/>
					<f:facet name="footer">  
						<p class="fl_left">
			       			<p:commandButton value="Não" styleClass="ui-confirmdialog-no" icon="ui-icon-close" onclick="PF(dialogMsgDecisao).hide();"/>
					    </p>
						<p class="fl_right">
			       			<p:commandButton value="SIm" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" action="#{cardapiosConsultaMB.redirecionaCardapioAlterar}">
			       				<f:setPropertyActionListener value="#{cardapio}" target="#{cardapiosConsultaMB.cardapioObjVO}" />
							</p:commandButton>			       			
						</p>  
					</f:facet>   
  				</p:dialog>
  				
				<p:dataGrid var="cardapio" value="#{cardapiosConsultaMB.cardapiosL}" columns="3" layout="grid"
				        paginator="true" id="cars" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
				 
				        <f:facet name="header">
				            CARDÁPIOS ATIVOS
				        </f:facet>
				 
				        <p:panel header="#{cardapio.categoriaCardapio}" style="text-align:center">
				            
				            <h:panelGrid columns="1" styleClass="ui-panelgrid" style="min-height:270px;">
				            
				                <h:graphicImage value="#{cardapio.imgCardapio}" width="100" height="100" />
				                <h:outputText value="#{cardapio.nomePrato}" style="font-weight:bold;width: 100px;"  />
				                <h:outputText value="#{cardapio.diasSemana}" style="color:red;width: 100px;"/>
				 
								<p:commandLink action="#{cardapiosConsultaMB.redirecionaCardapioAlterar}" title="Alterar Cardápio">
				                    <h:outputText styleClass="ui-icon ui-icon-pencil" style="margin:0 auto;" />
				                    <f:setPropertyActionListener value="#{cardapio}" target="#{cardapiosConsultaMB.cardapioObjVO}" />
				                </p:commandLink>

				            </h:panelGrid>
				        </p:panel>
			    </p:dataGrid>
      		</div>
	  	</div>
	</div>

	<!-- Copyright -->
	<div class="wrapper row4">
	  <footer id="copyright" class="clear">
	    <p class="fl_left">Copyright 2014 - All Rights Reserved - <a href="#">W7VM</a></p>
	    <p class="fl_right">W7VM <a href="http://www.w7vm.com/" title="Developer Application Mobile">Developer Application Mobile</a></p>
	  </footer>
	</div>
</h:form>
</h:body>
</html>